<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Flex布局例子</title>
    <link rel="stylesheet" href="css/style.css" />
  </head>
  <body>
    <div class="logo">
      <h1 id="title">Flex布局例子</h1>
    </div>

    <div id="menu">
      <ul>
        <li><a href="#">首页</a></li>
        <li><a href="#">新闻</a></li>
        <li><a href="#">产品</a></li>
        <li><a href="#">关于</a></li>
        <li><a href="#">联系</a></li>
      </ul>
      <div class="clear"></div>
    </div>

    <div id="main">
      <div id="p1">
        <div class="left">
          <div class="box1">1</div>
          <div class="box2">2</div>
          <div class="box3">3</div>
          <div class="box4">4</div>
        </div>
        <div class="right">
            <p>p1就是一个flex容器,包含了左，右两部分</p>
            <p>左也是一个flex容器，可以通过各种设置进行里面排列的变换</p>
        </div>
      </div>
    </div>
  </body>
</html>
